﻿using MyTodo.ViewModels;
using MyTodo.Views;
using Prism.DryIoc;
using Prism.Ioc;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace MyTodo
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : PrismApplication
    {
        //返回主窗体
        protected override Window CreateShell()
        {
            return Container.Resolve<MainView>();
        }


        /// <summary>
        /// 注册 服务 view与viewModel 等
        /// </summary>
        /// <param name="containerRegistry"></param>
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //注册导航页
            containerRegistry.RegisterForNavigation<IndexView, IndexViewViewModel>();
            containerRegistry.RegisterForNavigation<NotebookView, NotebookViewViewModel>();
            containerRegistry.RegisterForNavigation<NotebookPlusView, NotebookPlusViewViewModel>();
            containerRegistry.RegisterForNavigation<SettingsView,  SettingsViewViewModel>();
        }
    }
}
